<?php

/**
 * @author DeineAgentur UG
 * @copyright 2010
 */

$DIRECTORY_SEPARATOR = (strstr(strtoupper(substr(PHP_OS, 0, 3)), "WIN")) ? "\\" : "/";
define('DS',$DIRECTORY_SEPARATOR);
mb_internal_encoding( 'UTF-8' );
date_default_timezone_set('Europe/Berlin');

/**
 * 
 * @start Session Config
 * 
 */

$session_lifetime = 3600;
$DirectoryPath = dirname(__FILE__) . DS . "..". DS ."SessionData";
is_dir($DirectoryPath) or mkdir($DirectoryPath, 0777);

if (ini_get("session.use_trans_sid") == true) {
    ini_set("url_rewriter.tags", "");
    ini_set("session.use_trans_sid", false);
}

ini_set("session.gc_maxlifetime", $session_lifetime);
ini_set("session.gc_divisor", "1");
ini_set("session.gc_probability", "1");
ini_set("session.save_path", $DirectoryPath);
session_set_cookie_params( $session_lifetime , '/',  '.die-sms.de',  false,  true);
define('SESSION_NAME','SMSid');

/**
 * 
 * @end Session Config
 * 
 */

#config

// array('whirlpool', 'gost', 'sha512', 'sha256', 'ripemd256', 'sha1')
// if none given than is alternativ hash md5
$allowed_alternativ_hash = array('whirlpool','sha512');

define('MYSQL_HOST','localhost');
define('MYSQL_USER', '11_gameUser');
define('MYSQL_PASSWORD','Ad33kFT~,*gth6,s');
define('MYSQL_DB','11_gamedb');


 // Wartungsarbeiten
define('MAINTENANCE',false);
define('MAINTENANCETIME',1800);

/** Pfade zu den wichtigen Ordnern */

 // WWW-Verzeichnis
define('ROOTDIR',$_SERVER["DOCUMENT_ROOT"]);

 // Config-Verzeichnis
define('CONFIGDIR',realpath($_SERVER["DOCUMENT_ROOT"]."/../config"));

 // Controller_Classen-Verzeichnis
define('CONTROLLERDIR',realpath($_SERVER["DOCUMENT_ROOT"]."/../controller_class"));

 // Controller_Classen-Verzeichnis
define('HELPERDIR',realpath($_SERVER["DOCUMENT_ROOT"]."/../helper_class"));

 // Smarty-Lib-Verzeichnis
define('SMARTYDIR',realpath($_SERVER["DOCUMENT_ROOT"]."/../lib/smarty"));

 // Smarty_Templates-Verzeichnis
define('SMARTY_HTML',realpath($_SERVER["DOCUMENT_ROOT"]."/../smarty_data/templates").DS);
define('SMARTY_CHTML',realpath($_SERVER["DOCUMENT_ROOT"]."/../smarty_data/templates_c").DS);
define('SMARTY_CACHE',realpath($_SERVER["DOCUMENT_ROOT"]."/../smarty_data/cache").DS);
define('SMARTY_CONFIG',realpath($_SERVER["DOCUMENT_ROOT"]."/../smarty_data/config").DS);




    setlocale(LC_ALL, 'de_DE'); // Sprache auf Deutsch stellen
    bindtextdomain('messages', ROOTDIR.'../locale'); // Pfad der Uebersetzungstabellen
    textdomain('messages'); // Domain auswaehlen

#echo SMARTY_HTML;
    require_once(HELPERDIR."/autoloader_hclass.php");
    $auto_loader = new AutoLoader;
    $auto_loader->registerDirectory(CONTROLLERDIR.DS);
    $auto_loader->registerDirectory(HELPERDIR.DS);

?>